package NWish.properties.object3ds
{
	import NWish.Logger;
	
	import away3d.entities.Sprite3D;
	import away3d.materials.ColorMaterial;
	
	public class Sprite3DProperties extends EntityProperties
	{
		public function Sprite3DProperties(parent)
		{
			super(parent);
			
			var keys
			= 
				['width'
				,'height'
				,'mouseDetails'
				,new MaterialProperties(parent)
				];
			addPropertieKeys('Sprite',keys);
			
			addPropertieKeys_read('Sprite',['castsShadows']);
		}
		
		override public function get type()
		{
			return Sprite3D;
		}
		
		override public function get createEnable()
		{
			return true;
		}
		
		override public function toString()
		{
			return "Sprite3D";
		}
		
		override public function get multiCreateEnable()
		{
			return true;
		}
		
		override public function newType(scene,dict)
		{
			if(scene == null && dict == null)
				return new type(new ColorMaterial(0x00ffff),50,50);
			else if(scene)
				return new type(new ColorMaterial(0x00ffff),50,50);
			else
				throw new Error();
		}
	}
}